<div class="modal-header">
	<h4 class="modal-title" id="EditModalLabel">编辑用户信息</h4>
</div>
<div class="modal-body custom-scroll terms-body" id="editmodalbody">
	<div class="col-lg-12">
		<div class="well no-padding">
			<form id="form-edit" method="post" class="smart-form client-form"
				action="user/update/#(user.id)">
				<fieldset>
					<div class="row">
						<section class="col col-xs-12 col-sm-12">
							<label class="input"> <i class="icon-append fa fa-user"></i>
								<input type="text" id="user" name="user" placeholder="用户"
								value="#(user.user)"> <b
								class="tooltip tooltip-bottom-right">输入用户</b>
							</label>
						</section>

						<section class="col col-xs-12 col-sm-12">
							<label class="input"> <i
								class="icon-append fa fa-envelope-o"></i> <input type="email"
								id="email" name="email" placeholder="邮箱 " value="#(user.email)">
								<b class="tooltip tooltip-bottom-right">输入邮箱</b>
							</label>
						</section>
						<section class="col col-xs-12 col-sm-12">
							<label class="input"> <i class="icon-append fa fa-user"></i>
								<input type="text" id="name" name="name" placeholder="姓名"
								value="#(user.name)"> <b
								class="tooltip tooltip-bottom-right">输入姓名</b>
							</label>
						</section>
						<section class="col col-xs-12 col-sm-12">
							<label class="select"> <select id="sex" name="sex">
									<option value="1" #if(user.sex== 1) selected #end>男</option>
									<option value="0" #if(user.sex== 0) selected #end>女</option>
							</select> <i></i>
							</label>
						</section>
					</div>
				</fieldset>
				<footer>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button id="update" name="update" type="submit"
						class="btn btn-primary">更新</button>
				</footer>
			</form>
		</div>
	</div>
</div>

<script type="text/javascript">
	$(function() {
		// Validation
		$("#form-edit").validate({
			// Rules for form validation
			rules : {
				user : {
					required : true,
				},
				email : {
					required : true,
					email : true
				},
				name : {
					required : true,
				}
			},

			// Messages for form validation
			messages : {
				user : {
					required : '请输入用户名',
				},
				email : {
					required : '请输入邮箱',
					email : '请输入有效邮箱'
				},
				name : {
					required : '请输入姓名'
				}
			},
			// Do not change code below
			errorPlacement : function(error, element) {
				error.insertAfter(element.parent());
			}
		});
	});
</script>